#root {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem;
  text-align: center;
}

.logo {
  height: 6em;
  padding: 1.5em;
  will-change: filter;
  transition: filter 300ms;
}
.logo:hover {
  filter: drop-shadow(0 0 2em #646cffaa);
}
.logo.react:hover {
  filter: drop-shadow(0 0 2em #61dafbaa);
}

@keyframes logo-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: no-preference) {
  a:nth-of-type(2) .logo {
    animation: logo-spin infinite 20s linear;
  }
}

.card {
  padding: 2em;
}

.read-the-docs {
  color: #888;
}

.app-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  font-family: Arial, sans-serif;
}

h1 {
  text-align: center;
  color: #333;
  margin-bottom: 20px;
}

.demo-container {
  display: flex;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  min-height: 70vh;
}

.sidebar {
  width: 250px;
  background-color: black;
  padding: 20px;
  border-right: 1px solid #ddd;
}

.sidebar h2 {
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 18px;
  color: black;
}

.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar li {
  padding: 10px 15px;
  cursor: pointer;
  border-radius: 4px;
  margin-bottom: 5px;
  transition: background-color 0.3s;
}

.sidebar li:hover {
  background-color: #e9e9e9;
}

.sidebar li.active {
  background-color: #4a90e2;
  color: black;
}

.content {
  flex: 1;
  padding: 20px;
  background-color: #fff;
}

.demo-section {
  margin-bottom: 20px;
}

.demo-section h2 {
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
  margin-bottom: 15px;
}

.demo-section h3 {
  margin-top: 20px;
  margin-bottom: 10px;
  color: #4a90e2;
}

.demo-section pre {
  background-color: black;
  padding: 15px;
  border-radius: 5px;
  overflow-x: auto;
  margin: 15px 0;
  font-family: "Courier New", monospace;
}

.demo-section code {
  background-color: black;
  padding: 2px 5px;
  border-radius: 3px;
  font-family: "Courier New", monospace;
}

button {
  background-color: #4a90e2;
  color: black;
  border: none;
  padding: 8px 15px;
  border-radius: 4px;
  cursor: pointer;
  margin-right: 10px;
  margin-bottom: 10px;
  transition: background-color 0.3s;
}

button:hover {
  background-color: #357ae8;
}

.code-example {
  background-color: #f8f8f8;
  border: 1px solid #ddd;
  border-radius: 5px;
  padding: 15px;
  margin: 15px 0;
}

.card {
  border: 1px solid #ddd;
  border-radius: 5px;
  padding: 15px;
  margin-bottom: 15px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.highlight {
  background-color: #ffffcc;
  padding: 2px;
}

.example-output {
  background-color: #f0f8ff;
  padding: 10px;
  border-radius: 5px;
  margin: 10px 0;
  border-left: 4px solid #4a90e2;
}

.warning {
  background-color: #fff8e1;
  padding: 10px;
  border-radius: 5px;
  margin: 10px 0;
  border-left: 4px solid #ffc107;
}

.flex-container {
  display: flex;
  gap: 15px;
}

.flex-item {
  flex: 1;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 15px 0;
}

table th,
table td {
  border: 1px solid #ddd;
  padding: 8px;
  text-align: left;
}

table th {
  background-color: black;
}
p {
  color: black !important;
}
ul > li {
  color: red !important;
}

/* 全局样式 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f7f9fc;
}

.App {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
}

h1 {
  text-align: center;
  margin-bottom: 30px;
  color: #1a365d;
}

h2 {
  color: #2a4365;
  margin-bottom: 15px;
}

h3 {
  color: #2c5282;
  margin: 15px 0 10px 0;
}

/* 示例选择器 */
.example-selector {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
  gap: 10px;
}

.example-selector button {
  padding: 10px 20px;
  border: none;
  background-color: #e2e8f0;
  color: #4a5568;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
}

.example-selector button:hover {
  background-color: #cbd5e0;
}

.example-selector button.active {
  background-color: #4299e1;
  color: white;
}

/* 示例容器 */
.example-container {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 20px;
  margin-bottom: 20px;
}

.state-example {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.state-example p {
  color: #4a5568;
  margin-bottom: 15px;
}

/* Todo 应用样式 */
.todo-container {
  background-color: #f8fafc;
  border-radius: 6px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

form {
  display: flex;
  margin-bottom: 15px;
}

input {
  flex: 1;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 4px 0 0 4px;
  font-size: 14px;
}

form button {
  padding: 10px 15px;
  background-color: #4299e1;
  color: white;
  border: none;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
}

form button:hover {
  background-color: #3182ce;
}

.todo-list {
  list-style-type: none;
}

.todo-list li {
  padding: 12px 10px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.todo-list li:last-child {
  border-bottom: none;
}

.todo-list li.completed span {
  text-decoration: line-through;
  color: #a0aec0;
}

.todo-list li span {
  cursor: pointer;
  flex: 1;
}

.todo-list li button {
  padding: 5px 10px;
  background-color: #f56565;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}

.todo-list li button:hover {
  background-color: #e53e3e;
}

.todo-stats {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  margin-bottom: 15px;
  color: #4a5568;
  font-size: 14px;
}

/* 解释部分 */
.explanation {
  background-color: #f0f5ff;
  padding: 20px;
  border-radius: 6px;
  border-left: 4px solid #4299e1;
}

.explanation ul {
  margin-left: 20px;
}

.explanation li {
  margin-bottom: 8px;
}
